﻿@{
    ViewBag.Title = "Index.Android";
}

<script type="text/javascript" >

//    $(document).ready(function () {
//        // a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
//        
//       
// 

//         $("#VideoDialog").dialog({
//            autoOpen: false,
//            show: "blind",
//            hide: "blind",
//            resizable: false,
//            height: 410,
//            width: 500,
//            modal: true
//        });

//          
//          document.getElementById("VideoDialog").style.display ="none";
//          });
//        

</script>
 
 <div id="header">
            <h1>
                @Model.SurveyName </h1>
             
        </div>
        

       @using (Html.BeginForm())
       { 
        
            <div id="content" style="margin-bottom:200px;">
               @if(Model.ClosingDate >= DateTime.Now)
               
               {
                        <h2>
                            Welcome!</h2>
                          <br />
                        <div>
                           @Html.Raw(Model.IntroductionText)
                            <br />
                        </div>
                        <p></p>
                        <p style="width: 250px; min-width:120px; margin: 0 auto;">
                         
                                <button id="beginsurvey" class="ui-btn-hidden" data-theme="e" type="submit" aria-disabled="false" > Begin Survey</button>
                       


                        </p>
                        <p style="text-align:center;font-size:9pt;">Survey Closing Date: @string.Format("{0:dddd, MMMM d, yyyy}", Model.ClosingDate)</p>
                        
                        <p>&nbsp;</p>
                   <div style="margin: 0 auto; text-align:center;">
                        <div>
                            <span class="boldlabel">Survey #:</span> <span>
                               @Model.SurveyNumber</span></div>
                        <div>
                            <span class="boldlabel">Organization:</span> <span>
                                @Model.OrganizationName</span></div>
                        <div>
                            <span class="boldlabel">Department:</span> <span>
                               @Model.DepartmentName</span></div>
                        <div style="clear: both;">
                        </div>
                    </div>
                   
               }

               else
               { 
                <div>
                </div>
                <div id="attention">
                    <div class="image">
                        <img src="@Url.Content("~/Content/images/sign_warning.png")" alt="" style="vertical-align: middle;
                        padding-right: 5px; width:24px;" />
                    </div>
                    <div class="message" >
                        This survey is currently closed. Please contact the author of this survey for further
                        assistance.
                        <p style="text-align:left;">Survey Closing Date: @string.Format("{0:dddd, MMMM d, yyyy}", Model.ClosingDate)</p>
                    </div>

                    <div style="clear: both;"></div>    
                    
                </div>
               }
                
           </div>
           
           <div style="width:220px; padding:5px; border: 2px solid #04aeda; margin:2em auto;">
	            <div style="float:left; width:54px;">
	                <img alt="" style="z-index:12;" src="@Url.Content("~/Content/images/video.png")"/>
	            </div>
	            <div style="float:right; vertical-align:top; text-align:left; padding-right:10px;">
	                <span style="font: bold 10pt Segoe UI; color:#04aeda; "> Created using Epi Info 7</span>
	               <p style="margin: 5px 0;">
                @*   <a onclick ="OpenVideoDialogMobile();" class="watch" >Watch Video</a>*@
                   <a id="VideoDialog" href="http://www.youtube.com/watch?v=BgTJnSKQKIs" class="watch" >Watch Video</a>
                   </p>
	            </div>
	            <div style="clear:both;"></div>
            </div>

               
     }

   @*   <div id="VideoDialog"  title = "How this survey was created!">
               
     <iframe width="480" height="360" src="http://www.youtube.com/embed/BgTJnSKQKIs?rel=0" frameborder="0" allowfullscreen></iframe> 
              <span style="font: bold 10pt Segoe UI; color:#04aeda; ">  Epi Info 7</span> 
               
       </div>
*@